package com.meshnetics.gb.stack.core.apl.type;

import com.meshnetics.gb.type.impl.zcl.FixedBytesDataType;
import com.meshnetics.gb.type.impl.zcl.FixedBytesDataValue;

/**
 * Type for DeviceVersion.
 *
 * @author mmarkov
 */
public class TypeDeviceVersion extends FixedBytesDataType {
    /** The only instance of this type. */
    public static final TypeDeviceVersion TYPE = new TypeDeviceVersion();

    /**
     * Contructs TypeDeviceVersion with the pre-defined name ('deviceVersion').
     */
    private TypeDeviceVersion() {
        super(new String[] { "deviceVersion" }, 1);
    }

    /**
     * Creates TypeDeviceVersion from array of bytes.
     *
     * @param bytes array of bytes
     * @return constructed TypeDeviceVersion
     */
    protected FixedBytesDataValue createValue(byte[] bytes) {
        return new DeviceVersion(this, bytes);
    }
}


